import { ref } from "vue";
import { defineStore } from "pinia";

export const usePigeonCommonStore = defineStore("pigeonCommon", () => {
  const isShowLeftMenu = ref(false);
  const topCrumbsText = ref("");
  /**
   * 修改头部text
   * @param {Number} index 数据的下标
   */
  const setTopCrumbsText = (text: string) => {
    topCrumbsText.value = text;
  };
  /**
   * 修改状态
   * @param {Number} index 数据的下标
   */
  const setShowLeftMenu = (isShow: boolean) => {
    isShowLeftMenu.value = isShow;
  };
  return {
    isShowLeftMenu,
    topCrumbsText,
    setShowLeftMenu,
    setTopCrumbsText,
  };
});
